package cn.edu.qzuie.artist.module.td.controller.admin.region.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.edu.qzuie.artist.framework.excel.core.annotations.DictFormat;
import cn.edu.qzuie.artist.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - 地域 Response VO")
@Data
@ExcelIgnoreUnannotated
public class RegionRespVO {

    @Schema(description = "表id", requiredMode = Schema.RequiredMode.REQUIRED, example = "156")
    @ExcelProperty("表id")
    private Long id;

    @Schema(description = "地区名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "泉州市")
    @ExcelProperty("地区名称")
    private String name;

    @Schema(description = "父id", example = "13")
    @ExcelProperty("父id")
    private Long parentId;

    @Schema(description = "地区等级", example = "2")
    @ExcelProperty(value = "地区等级", converter = DictConvert.class)
    @DictFormat("region_level") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer level;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}